<!--
*Author：富行天下团队
 
 *代码由框架生成,任何更改都可能导致被代码生成器覆盖
 *业务请在@/extension/Park/Park.js此处编写
 -->
<template>
    <div>
        <view-grid
                   ref="grid"
                   :columns="columns"
                   :detail="detail"
                   :editFormFields="editFormFields"
                   :editFormFileds="editFormFields"
                   :editFormOptions="editFormOptions"
                   :searchFormFields="searchFormFields"
                   :searchFormFileds="searchFormFields"
                   :searchFormOptions="searchFormOptions"
                   :table="table"
                   :extend="extend">
        </view-grid>
    </div>
</template>

<script>
    import extend from "@/extension/Park/Park.js";
    import ViewGrid from "@/components/basic/ViewGrid.vue";
    var vueParam = {
        components: {
            ViewGrid
        },
        data() {
            return {
                table: {
                    key: 'parkId',
                    footer: "Foots",
                    cnName: '园区管理',
                    name: 'Park',
                    url: "/Park/",
                    sortName: "parkId"
                },
                extend: extend,
                editFormFields: {memberLevel: [],cardType: [],"parkName":"","parkCode":"","parkAddress":"","isreserve":"1","parkType":"","parkTimeInterval":"","timeContainer":"","parkOpenStartTime":"","parkOpenEndTime":"","merchantCode":"","merchantName":"","modifier":"","modifyDate":"","modifyID":"","createDate":"","createID":"","creator":""},
                editFormOptions: [[{"title":"园区名称","required":true,"field":"parkName","colSize":6,"type":"text"},
                               {"title":"园区编码","required":true,"field":"parkCode","colSize":6,"type":"alphanumeric"}],
                              [{"title":"园区地址","field":"parkAddress","colSize":6,"type":"text"},
                               {"title":"园区类型","field":"parkType","type":"select","dataKey":"tree_protype","data":[],"colSize":6}],
                              [{"title":"园区开放时间","field":"timeContainer","colSize":6,"type":"is-range"},
                               {"title":"园区预约时间间隔","field":"parkTimeInterval","colSize":6,"type":"number"}],
                              [{"title":"园区开放开始时间","field":"parkOpenStartTime","colSize":6,"type":"datetime",hidden:true},
                               {"title":"园区开放结束时间","field":"parkOpenEndTime","colSize":6,"type":"datetime",hidden:true}],
                               [{"title":"是否预约","field":"isreserve","colSize":6,"type":"switch"},
                               ],
                               [{dataKey: "",data: [],title: "会员等级",field: "memberLevel",type: "cascaderEl",multiple: true,"colSize":6,label: 'label',id:'value',required: true},
                               {
                                dataKey: "cardTemplate",
                                data: [],
                                title: "卡等级",
                                field: "cardType",
                                type: "selectList",
                                multiple: true,
                                required: true,
                                "colSize":6
                                }],
                              [{"title":"商户编码","field":"merchantCode",hidden:true},
                               {"title":"商户名称","field":"merchantName",hidden:true},
                               {"title":"修改人","field":"modifier",hidden:true},
                               {"title":"修改时间","field":"modifyDate",hidden:true},
                               {"title":"修改人ID","field":"modifyID","type":"number",hidden:true},
                               {"title":"创建时间","field":"createDate",hidden:true},
                               {"title":"创建人ID","field":"createID","type":"number",hidden:true},
                               {"title":"创建人","field":"creator",hidden:true}]],
                searchFormFields: {"parkName":"","parkCode":"","parkAddress":"","parkType":"","parkOpenStartTime":"","parkOpenEndTime":""},
                searchFormOptions: [[{"title":"园区名称","field":"parkName","type":"like"},{"title":"园区编码","field":"parkCode","type":"like"}],[{"title":"园区地址","field":"parkAddress","type":"like"},{"title":"园区类型","field":"parkType","type":"select","dataKey":"tree_protype"}]],
                columns: [{field:'parkId',title:'主键',type:'int',width:90,hidden:true,readonly:true,require:true,align:'left'},
                       {field:'parkName',title:'园区名称',type:'string',width:150,align:'left',sortable:true,show:true},
                       {field:'parkCode',title:'园区编码',type:'string',width:150,align:'left',show:true},
                       {field:'parkAddress',title:'园区地址',type:'string',width:200,align:'left',show:true},
                       {field:'parkType',title:'园区类型',type:'string',width:120,align:'left'},
                       {field:'isreserve',title:'是否预约',bind: { key: 'enable', data: [] },type:'int',width:120,align:'left'},
                       {field:'parkOpenStartTime',title:'园区开放开始时间',type:'datetime',width:160,align:'left',sortable:true},
                       {field:'parkOpenEndTime',title:'园区开放结束时间',type:'datetime',width:160,align:'left',sortable:true},
                       {field:'parkTimeInterval',title:'园区预约时间间隔(分钟)',type:'int',width:170,align:'left'},
                       {field:'merchantCode',title:'商户编码',type:'string',width:220,align:'left',hidden:true},
                       {field:'merchantName',title:'商户名称',type:'string',width:220,align:'left',hidden:true},
                       {field:'creator',title:'创建人',type:'string',width:90,align:'left',show:true},
                       {field:'createDate',title:'创建时间',type:'datetime',width:160,align:'left',sortable:true},
                       {field:'createID',title:'创建人ID',type:'int',width:90,hidden:true,align:'left'},
                       {field:'modifier',title:'修改人',type:'string',width:90,align:'left',show:true},
                       {field:'modifyDate',title:'修改时间',type:'datetime',width:160,align:'left',sortable:true},
                       {field:'modifyID',title:'修改人ID',type:'int',width:90,hidden:true,align:'left'},],
                detail: {
                    cnName:"园区闸机",
                     columns: [{field:'gateid',title:'主键',type:'int',width:90,hidden:true,readonly:true,require:true,align:'left'},
                       {field:'gateName',title:'闸机名称',type:'string',width:120,align:'left',require:true,edit: { type: "text",required:true },show:true},
                       {field:'gateCode',title:'闸机编码',type:'string',width:120,align:'left',sortable:true,require:true,edit: { type: "alphanumeric",required:true },show:true},
                       {field:'gateIP',title:'闸机IP',type:'string',width:120,align:'left',edit: { type: "text" },show:true},
                       {field:'gateMac',title:'闸机mac地址',type:'string',width:200,align:'left',edit: { type: "text" },show:true},
                       {field:'gateAddress',title:'闸机位置',type:'string',width:200,align:'left',edit: { type: "text" },show:true},
                       {field:'parkId',title:'园区ID',type:'int',width:90,align:'left',hidden:true},
                       {field:'creator',title:'创建人',type:'string',width:90,align:'left',show:true},
                       {field:'createDate',title:'创建时间',type:'datetime',width:160,align:'left',sortable:true},
                       {field:'createID',title:'创建人ID',type:'int',width:90,hidden:true,align:'left'},
                       {field:'modifier',title:'修改人',type:'string',width:90,align:'left',show:true},
                       {field:'modifyDate',title:'修改时间',type:'datetime',width:160,align:'left',sortable:true},
                       {field:'modifyID',title:'修改人ID',type:'int',width:90,hidden:true,align:'left'},],
                    sortName: "parkId",
                    key:"parkId"
                }
            };
        }
    };
    export default vueParam;
</script>